body {
  background: #f2f2f2;
  min-height: 100vh;
}
#main {
  padding-bottom: 3rem;
  overflow-y: scroll;
}
footer {
  position: fixed;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  left: 0;
  bottom: 0;
  width: 100%;
  max-height: 2.5rem;
  min-height: 2.5rem;
  padding: .3rem 0;
  background: #f2f2f2;
  -webkit-justify-content: space-around;
      -ms-flex-pack: distribute;
          justify-content: space-around;
}
footer::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  -webkit-transform-origin: 0 0;
          transform-origin: 0 0;
  -webkit-transform: scaleY(0.5);
          transform: scaleY(0.5);
}
footer label input[type='text'] {
  margin: 0;
  border: none;
  background: white;
}
footer button.send {
  border: none;
  background: #d5d5de;
  color: white;
  pointer-events: none;
}
footer button.send.ok {
  pointer-events: auto;
  background: orange;
}
footer button.send:active {
  background: orangered;
}
.time {
  text-align: center;
  padding: .5rem 0;
  margin: 0;
}
.avatar {
  max-width: 2rem;
  min-width: 2rem;
  max-height: 2rem;
  min-height: 2rem;
  border-radius: 50%;
  margin: 0 .5rem;
}
.avatar.border {
  border: 1px solid #a2a2a8;
}
.msg-container {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  position: relative;
}
.msg-box {
  position: relative;
  border-radius: 10px;
  background: white;
  -webkit-box-flex: 1;
  -webkit-flex-grow: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
  font-size: 16px;
  padding: .5rem;
  overflow: hidden;
  word-wrap: break-word;
}
.other {
  margin-right: 3rem;
}
.other .img-container::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: white;
  top: .5rem;
  -webkit-transform: translateX(-50%) rotate(45deg);
          transform: translateX(-50%) rotate(45deg);
  background-color: #f1d4be;
}
.own {
  -webkit-box-pack: end;
  -webkit-justify-content: flex-end;
      -ms-flex-pack: end;
          justify-content: flex-end;
  margin-left: 3rem;
}
.own .img-container {
  position: relative;
}
.own .img-container::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: white;
  left: -0.5rem;
  top: .5rem;
  -webkit-transform: translateX(50%) rotate(45deg);
          transform: translateX(50%) rotate(45deg);
  background-color: #c8e8de;
}
.msg-box-left {
  background-color: #c8e8de;
}
.msg-box-right {
  background-color: #f1d4be;
}
